$text-color: #2d2d2d !default;
$popover-bg: #ffffff !default;
$stage-bg: #ffffff !default;
$button-bg: #f1f1f1 !default;
$disabled-btn-color: #808080 !default;

$popover-z-index: 1000000000 !default;
$overlay-z-index: 100002 !default;
$stage-z-index: 100003 !default;
$highlighted-element-z-index: 100004 !default;

// Note: If you update this duration, make sure to
// update `ANIMATION_DURATION_MS` constant
$animation-ms: 300 !default;
$animation-sec: ($animation-ms / 1000) * 1s !default;

div#driver-popover-item {
  display: none;
  position: absolute;
  background: $popover-bg;
  color: $text-color;
  margin: 0;
  padding: 15px;
  border-radius: 5px;
  min-width: 250px;
  max-width: 300px;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
  z-index: $popover-z-index;

  .driver-popover-tip {
    border: 5px solid $popover-bg;
    content: '';
    position: absolute;

    &.bottom {
      bottom: -10px;
      border-top-color: $popover-bg;
      border-right-color: transparent;
      border-bottom-color: transparent;
      border-left-color: transparent;

      &.position-center {
        left: 49%;
      }

      &.position-right {
        right: 20px;
      }
    }

    &.left {
      left: -10px;
      top: 10px;
      border-top-color: transparent;
      border-right-color: $popover-bg;
      border-bottom-color: transparent;
      border-left-color: transparent;

      &.position-center {
        top: 46%;
      }

      &.position-bottom {
        top: auto;
        bottom: 20px;
      }
    }

    &.right {
      right: -10px;
      top: 10px;
      border-top-color: transparent;
      border-right-color: transparent;
      border-bottom-color: transparent;
      border-left-color: $popover-bg;

      &.position-center {
        top: 46%;
      }

      &.position-bottom {
        top: auto;
        bottom: 20px;
      }
    }

    &.top {
      top: -10px;
      border-top-color: transparent;
      border-right-color: transparent;
      border-bottom-color: $popover-bg;
      border-left-color: transparent;

      &.position-center {
        left: 49%;
      }

      &.position-right {
        right: 20px;
      }
    }

    &.mid-center {
      display: none;
    }
  }

  .driver-popover-footer {
    display: block;
    margin-top: 10px;

    button {
      display: inline-block;
      padding: 3px 10px;
      border: 1px solid #d4d4d4;
      text-decoration: none;
      text-shadow: 1px 1px 0 #fff;
      color: $text-color;
      font: 11px/normal sans-serif;
      cursor: pointer;
      outline: 0;
      background-color: $button-bg;
      border-radius: 2px;
      zoom: 1;
      line-height: 1.3;
    }

    button.driver-disabled {
      color: $disabled-btn-color;
      cursor: default;
      pointer-events: none;
    }

    .driver-close-btn {
      float: left;
    }

    .driver-close-only-btn {
      float: right;
    }

    .driver-btn-group {
      float: right;
    }
  }

  .driver-popover-title {
    font: 19px/normal sans-serif;
    margin: 0 0 5px;
    font-weight: bold;
    display: block;
    position: relative;
    line-height: 1.5;
    zoom: 1;
  }

  .driver-popover-description {
    margin-bottom: 0;
    font: 14px/normal sans-serif;
    line-height: 1.5;
    color: $text-color;
    font-weight: normal;
    zoom: 1;
  }
}

.driver-clearfix:before {
  content: "";
  display: table;
}

.driver-clearfix:after {
  clear: both;
  content: "";
  display: table;
}

.driver-stage-no-animation {
  transition: none !important;

  background: transparent !important;
  outline: 5000px solid rgba(0, 0, 0, 0.75);
}

div#driver-page-overlay {
  background: #000000;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  display: block;
  width: 100%;
  height: 100%;
  zoom: 1;
  filter: alpha(opacity=75);
  opacity: 0.75;
  z-index: $overlay-z-index !important;

  transition: all $animation-sec;
}

div#driver-highlighted-element-stage {
  position: absolute;
  top: 0;
  left: 0;
  height: 50px;
  width: 300px;
  background: $stage-bg;
  z-index: $stage-z-index !important;
  display: none;
  border-radius: 2px;

  transition: all $animation-sec;
}

.driver-highlighted-element {
  z-index: $highlighted-element-z-index !important;
}

.driver-position-relative {
  position: relative !important;
}

.driver-fix-stacking {
  z-index: auto !important;
  opacity: 1.0 !important;
  transform: none !important;
  filter: none !important;
  perspective: none !important;
  transform-style: flat !important;
  transform-box: border-box !important;
  will-change: unset !important;
}
